import { createApp } from "vue";
import App from "./App.vue";
// 路由
import { Router } from "./router/index.js";
// pinia
import { createPinia } from "pinia";
import piniaPluginPersist from "pinia-plugin-persist";
const store = createPinia();
store.use(piniaPluginPersist)
//全局引入element-plus图标
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
const app = createApp(App);
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}
// 自定义指令
import {AuthDiretive} from '@/directives/auth.directive.js'
app.use(Router);
app.use(store);
app.directive(AuthDiretive.name, AuthDiretive)
app.mount("#app");
